/*-----------------------------------------------------------------------------
*
*  This file is part of "Game Update Client"
*
*  Revise History:
*    Date          Author           Comment
*    2008-09-19    jszhang     Initial version.
*
*  Copyright (c) 2007 duwei Corporation.
*
*-----------------------------------------------------------------------------
*/

#pragma once

#include "atlutil.h"
#include <map>

namespace Utility
{
	namespace Configuration{
		//define the game type enum
		
		//Singleton, only one configuration instance
		class CConfigurationUtil
		{
		public:
			static CConfigurationUtil* GetInstance();
			static void ReleaseInstance();
			~CConfigurationUtil();

			//get key code String
			const CString getKeyCodeString(int keycode) const ;
			const int getKeyCodeNumber(CString key) const;

		private:
			static CConfigurationUtil* instance;

			//make constructor private
			CConfigurationUtil();
			CConfigurationUtil(const CConfigurationUtil&);
			CConfigurationUtil& operator= (const CConfigurationUtil&);

			//init the keycode map
			void initKeyCodeMap();

			//keycode map
			std::map<int, CString> m_keyCodeMap;
		};
	}
}